import { InjectionKey } from 'vue'
import { createStore, useStore as baseUseStore, Store } from 'vuex'
import user from './modules/user';
import version from './modules/version';
// import { rootState } from './types';


export const key: InjectionKey<Store<null>> = Symbol()

export const store = createStore<null>({
   modules:{
     user,
	 version,
   },
})

// 定义自己的 `useStore` 组合式函数
export function useStore () {
  return baseUseStore(key)
}
